Changes for Silicon Graphics Iris 5D.
authorJim Blandy <jimb@redhat.com>
Wed, 19 May 1993 04:56:06 +0000 (04:56 +0000)
committerJim Blandy <jimb@redhat.com>
Wed, 19 May 1993 04:56:06 +0000 (04:56 +0000)
* unexelfsgi.c: New file; like unexelf.c, but tolerates program
segments above BSS.
* m/iris5d.h: New file.
* s/irix5-0.h: New file.
* process.c [__sgi] (allocate_pty): Give up immediately if pty is
inaccessible.

src/m/iris5d.h
src/s/irix5-0.h
src/unexsgi.c

index 1b9cfdfc8f6f600b024a0db47e79fcc8563e6fe3..dd41d3123555d92ed239488b806658ae3030b37a 100644 (file)
@@ -120,7 +120,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 /* This machine requires completely different unexec code
    which lives in a separate file.  Specify the file name.  */
 
-#define UNEXEC unexmips.o
+#ifdef UNEXEC
+#undef UNEXEC
+#endif
+#define UNEXEC unexelfsgi.o
 
 #define TEXT_START 0x400000
 
index 7f8cb356ee6291d9c48ecdc54653d960ecc4d3aa..fe42458768aa1db3d44ecc420cccdd056f63162c 100644 (file)
@@ -1,6 +1,17 @@
-#include "irix3-3.h"
+#include "s-usg5-4.h"
+#ifdef LIBS_SYSTEM
+#undef LIBS_SYSTEM
+#endif
+
+#ifdef SYSTEM_TYPE
+#undef SYSTEM_TYPE
+#endif
+#define SYSTEM_TYPE "silicon-graphics-unix"
+
+#ifdef SETUP_SLAVE_PTY
+#undef SETUP_SLAVE_PTY
+#endif
 
-#define USG5_3
 
 /* Define HAVE_ALLOCA to say that the system provides a properly
    working alloca function and it should be used. */
    we'll just define WNOHANG right here.
    (An implicit decl is good enough for wait3.)  */
 
-#define WNOHANG                0x1
+/* #define WNOHANG             0x1 */
 
 /* No need to use sprintf to get the tty name--we get that from _getpty.  */
+#ifdef PTY_TTY_NAME_SPRINTF
+#undef PTY_TTY_NAME_SPRINTF
+#endif
 #define PTY_TTY_NAME_SPRINTF
 /* No need to get the pty name at all.  */
+#ifdef PTY_NAME_SPRINTF
+#undef PTY_NAME_SPRINTF
+#endif
 #define PTY_NAME_SPRINTF
 #ifdef emacs
 char *_getpty();
index b37e09da2f91225e28d1e9321ef5567e26be8eb3..67fc20ccf95b6fe6f4b7b449ec582724363e07f5 100644 (file)
@@ -630,8 +630,11 @@ unexec (new_name, old_name, data_start, bss_start, entry_address)
       if ((OLD_SECTION_H (old_bss_index)).sh_addralign > alignment)
        alignment = OLD_SECTION_H (old_bss_index).sh_addralign;
 
+      /* Supposedly this condition is okay for the SGI.  */
+#if 0
       if (NEW_PROGRAM_H(n).p_vaddr + NEW_PROGRAM_H(n).p_filesz > old_bss_addr)
        fatal ("Program segment above .bss in %s\n", old_name, 0);
+#endif
 
       if (NEW_PROGRAM_H(n).p_type == PT_LOAD
          && (round_up ((NEW_PROGRAM_H (n)).p_vaddr
@@ -646,7 +649,7 @@ unexec (new_name, old_name, data_start, bss_start, entry_address)
   NEW_PROGRAM_H(n).p_filesz += new_data2_size;
   NEW_PROGRAM_H(n).p_memsz = NEW_PROGRAM_H(n).p_filesz;
 
-#if 0 /* Maybe allow section after data2 - does this ever happen? */
+#if 1 /* Maybe allow section after data2 - does this ever happen? */
   for (n = new_file_h->e_phnum - 1; n >= 0; n--)
     {
       if (NEW_PROGRAM_H(n).p_vaddr